// tests usart (#2)

/*
Copyright 2010 Anthony Oko, Koby Hitchen, Mara Cairo, Shaochen Xu, Tyler Lucas

   This file is part of the trajctrl program.

   trajctrl is licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

#include <stdint.h>
#include "../usart.h"
#include "../ledmsg.h"
#include <util/delay.h>
#include <avr/io.h>

#ifndef F_CPU
#define F_CPU 16000000UL
#endif

int main()
{
	init_usart(38400);
	char s[130]; s[0]=0; char *p = s;
	txstr("\rusart-test2\n\rType!\n\n\r");

	while(1)
	{
		p = rxstr_ESC(130, p);
		txstr("\n\r...\n\r");
	}
}
